define([
		'yf', 'yfUtil',
		'jquery',
		'underscore'
	],
	function (yf, yfUtil, $, _) {
		var me;
		var addAddress = {
			initialize: function () {
				me = this;
				addAddress.$el.find('.goBack').on('click', function () {
					yf.goBack_NVG();
				});
			},
			bindEvents: {
				'click .saveBtn': "saveFn"
			},
			saveFn: function () {
				var user_name = me.$el.find('.user_name').val(),
					user_phone = me.$el.find('.user_phone').val(),
					user_address = me.$el.find('.user_address').val();
				var isNeed = user_name.isNeed(),
					isPhone = user_phone.isPhone(),
					isAddress = user_address.isNeed();
				if(user_name==""){
					var showToast = new ShowToast("姓名不能为空");
				}else if(!isNeed){
					var showToast = new ShowToast("姓名不能含有特殊字符");
				}else if(user_phone==""){
					var showToast = new ShowToast("手机号码不能为空");
				}else if(!isPhone){
					var showToast = new ShowToast("请输入正确的手机号码");
				}else if(user_address==""){
					var showToast = new ShowToast("地址不能为空");
				}else if(!isAddress){
					var showToast = new ShowToast("请输入正确的地址");
				}else{
					var showToast = new ShowToast("保存成功");
				}
			}
		}
		return addAddress;
	});